package com.heykui.restfulcrud.Exception;

import com.heykui.restfulcrud.result.CodeMsg;

public class Base extends RuntimeException {
    
    private static final long serialVersionUID = 1L;

    public Integer errcode;
    public String msg;

    public Base(CodeMsg codeMsg){
        this.errcode = codeMsg.getCode();
        this.msg = codeMsg.getMsg();
    }

    public Base(CodeMsg codeMsg, String reMsg){
        this.errcode = codeMsg.getCode();
        this.msg = reMsg;
    }
    
    /**
     * @return the errcode
     */
    public Integer getErrcode() {
        return errcode;
    }
    /**
     * @return the msg
     */
    public String getMsg() {
        return msg;
    }
}